package swing.renderer;

import java.awt.FlowLayout;
import java.awt.GridLayout;
import java.lang.reflect.Field;

import javax.swing.JLabel;
import javax.swing.JPanel;

import annotations.Param;


public abstract class Renderer extends JPanel {
	
	Field field;
	String name;
	String description;
	String iconURL;
	Object initialValue;
	
	
	public Renderer(Field field, String name, String desctiption, String iconURL, Object initialValue){
		
		this.field=field;
		this.name=name;
		this.description=desctiption;
		this.iconURL=iconURL;
		this.initialValue=initialValue;
		
		setLayout(new GridLayout(1, 2));
		//setLayout(new FlowLayout());
		JLabel label = new JLabel(name);
		label.setToolTipText(desctiption);
		add(label);
		
	
	}
	
	public String getName(){
		return name;
	}
	
	public Field getField(){
		return field;
	}
	
	public abstract Object getValue();


}
